<template>
    <view class="about">
        <pagehead>关于我们</pagehead>
        <view class="top">
            <image class="logo" :src="IMAGE_STATIC+'/images/logo.png'" mode="widthFix" />
            <view class="p">V{{ version_no }}</view>
        </view>
        <view class="content">
        <view class="item" v-for="(item,index) in arrownsList" :key="index" 
        @tap.stop="$tools.jump('/pages/setup/protocolDetail',item.id,item.name)">
            <view class="left">
              <text>{{item.name}}</text>
            </view>
            <view class="right">
              <view class="arrows"></view>
            </view>
        </view>
        </view>
        <view class="bottom">
          <view class="p"> 粤ICP备2024248591号</view>
          <view class="p">瑞天源科技（深圳）有限公司 版权所有</view>
        </view>
    </view>
</template>

<script>
export default {
    data () {
        return {
          IMAGE_STATIC: this.$url.assetsPath,
          content:'关于我们',
          version_no:'1.0.0',
          arrownsList:[
                {name:'隐私保护政策',id:2},
                {name:'隐私协议',id:5},
            ]
        };
    },
    onLoad (options) {
      // #ifdef H5
      this.getNewVersion(1)
      // #endif
      const system_info = uni.getSystemInfoSync();
      console.log(system_info)
      // #ifdef MP-WEIXIN
      this.version_no = system_info.appVersion
      // #endif   
      // #ifdef APP-PLUS
      this.version_no = system_info.appWgtVersion
       // #endif      
       console.log('本地版本：',this.version_no);      
    },
    methods: {
      getNewVersion(type){
				var data = {};
				data['device_type'] = type == 1 ? 'android' : 'iOS';
				console.log("data:",data);
				this.$Ajax('/api/sys/version/getNewVersion',data, res => {
						if(res.success){
              this.version_no = res.data.versionInfo.version_no
              console.log('服务上版本：',this.version_no);
						}
					}, err => {
					},  false
				);
			},
    },
};
</script>

<style lang="scss" scoped>
.content{
    padding: 40rpx 20rpx;
}
image,img,video{
    max-width: 100%;
}
.about{
  .top{
    background: #fff;
    text-align: center;
    padding: 64rpx;
    .logo{
      width: 144rpx;
      margin: auto;
    }
    .p{
      margin-top: 16rpx;
      font-size: 28rpx;
      color: #646466;
    }
  }
  .content{
    background: #fff;
    margin-top: 20rpx;
      .item{
        width: 93.6%;
        margin: auto;
        @include flexBetween;
        padding-top: 28rpx;
        padding-bottom: 28rpx;
        border-bottom: 1px solid #eee;
        .left{
            @include flexLeft;
            font-weight: 600;
            font-size: 28rpx;
            color: #333333;
        }
        .img{
            width: 40rpx;
            height: 40rpx;
            margin-right: 20rpx;
        }
        .arrows{
            width:32rpx ;
            height: 32rpx;
            background: url(https://api.anyueqc.cn/pics/userimage/arrows.png) 100% no-repeat;
            background-size: 100% 100%;
        }
    }
    .item:last-of-type{
        border-bottom: none;
    }
  }
  .bottom{
    margin-top: 92rpx;
    font-size: 24rpx;
    color: #666666; 
    text-align: center;
    .p{
      margin-bottom: 10rpx;
    }
  }
}
</style>
